/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author edgar
 */
@Embeddable
public class VentasDetallePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "nro_factura")
    private int nroFactura;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nro_linea")
    private int nroLinea;

    public VentasDetallePK() {
    }

    public VentasDetallePK(int nroFactura, int nroLinea) {
        this.nroFactura = nroFactura;
        this.nroLinea = nroLinea;
    }

    public int getNroFactura() {
        return nroFactura;
    }

    public void setNroFactura(int nroFactura) {
        this.nroFactura = nroFactura;
    }

    public int getNroLinea() {
        return nroLinea;
    }

    public void setNroLinea(int nroLinea) {
        this.nroLinea = nroLinea;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nroFactura;
        hash += (int) nroLinea;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VentasDetallePK)) {
            return false;
        }
        VentasDetallePK other = (VentasDetallePK) object;
        if (this.nroFactura != other.nroFactura) {
            return false;
        }
        if (this.nroLinea != other.nroLinea) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.VentasDetallePK[ nroFactura=" + nroFactura + ", nroLinea=" + nroLinea + " ]";
    }
    
}
